Optimal. Leaf size=105 \[ -\frac {x (3 d-4 e+6 f)+5 d-6 e+8 f}{12 \left (x^2+3 x+2\right )}-\frac {1}{36} \log (1-x) (d+e+f)+\frac {1}{144} \log (2-x) (d+2 e+4 f)-\frac {1}{36} \log (x+1) (7 d-13 e+19 f)+\frac {1}{144} \log (x+2) (31 d-50 e+76 f) \]
________________________________________________________________________________________
Rubi [A] time = 0.32, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {1586, 1060, 1072, 632, 31} \begin {gather*} -\frac {x (3 d-4 e+6 f)+5 d-6 e+8 f}{12 \left (x^2+3 x+2\right )}-\frac {1}{36} \log (1-x) (d+e+f)+\frac {1}{144} \log (2-x) (d+2 e+4 f)-\frac {1}{36} \log (x+1) (7 d-13 e+19 f)+\frac {1}{144} \log (x+2) (31 d-50 e+76 f) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 632
Rule 1060
Rule 1072
Rule 1586
Rubi steps
\begin {align*} \int \frac {\left (2-3 x+x^2\right ) \left (d+e x+f x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx &=\int \frac {d+e x+f x^2}{\left (2-3 x+x^2\right ) \left (2+3 x+x^2\right )^2} \, dx\\ &=-\frac {5 d-6 e+8 f+(3 d-4 e+6 f) x}{12 \left (2+3 x+x^2\right )}-\frac {1}{72} \int \frac {6 (3 d-10 e+12 f)-24 (2 d-3 e+5 f) x+6 (3 d-4 e+6 f) x^2}{\left (2-3 x+x^2\right ) \left (2+3 x+x^2\right )} \, dx\\ &=-\frac {5 d-6 e+8 f+(3 d-4 e+6 f) x}{12 \left (2+3 x+x^2\right )}-\frac {\int \frac {-288 (2 d-3 e+5 f)+108 (3 d-10 e+12 f)+(72 (3 d-4 e+6 f)-36 (3 d-10 e+12 f)) x}{2-3 x+x^2} \, dx}{5184}-\frac {\int \frac {288 (2 d-3 e+5 f)+108 (3 d-10 e+12 f)-(72 (3 d-4 e+6 f)-36 (3 d-10 e+12 f)) x}{2+3 x+x^2} \, dx}{5184}\\ &=-\frac {5 d-6 e+8 f+(3 d-4 e+6 f) x}{12 \left (2+3 x+x^2\right )}-\frac {1}{144} (-31 d+50 e-76 f) \int \frac {1}{2+x} \, dx-\frac {1}{144} (-d-2 e-4 f) \int \frac {1}{-2+x} \, dx-\frac {1}{36} (d+e+f) \int \frac {1}{-1+x} \, dx-\frac {1}{36} (7 d-13 e+19 f) \int \frac {1}{1+x} \, dx\\ &=-\frac {5 d-6 e+8 f+(3 d-4 e+6 f) x}{12 \left (2+3 x+x^2\right )}-\frac {1}{36} (d+e+f) \log (1-x)+\frac {1}{144} (d+2 e+4 f) \log (2-x)-\frac {1}{36} (7 d-13 e+19 f) \log (1+x)+\frac {1}{144} (31 d-50 e+76 f) \log (2+x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 97, normalized size = 0.92 \begin {gather*} \frac {1}{144} \left (-\frac {12 (d (3 x+5)-4 e x-6 e+6 f x+8 f)}{x^2+3 x+2}-4 \log (1-x) (d+e+f)+\log (2-x) (d+2 e+4 f)-4 \log (x+1) (7 d-13 e+19 f)+\log (x+2) (31 d-50 e+76 f)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (2-3 x+x^2\right ) \left (d+e x+f x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.28, size = 191, normalized size = 1.82 \begin {gather*} -\frac {12 \, {\left (3 \, d - 4 \, e + 6 \, f\right )} x - {\left ({\left (31 \, d - 50 \, e + 76 \, f\right )} x^{2} + 3 \, {\left (31 \, d - 50 \, e + 76 \, f\right )} x + 62 \, d - 100 \, e + 152 \, f\right )} \log \left (x + 2\right ) + 4 \, {\left ({\left (7 \, d - 13 \, e + 19 \, f\right )} x^{2} + 3 \, {\left (7 \, d - 13 \, e + 19 \, f\right )} x + 14 \, d - 26 \, e + 38 \, f\right )} \log \left (x + 1\right ) + 4 \, {\left ({\left (d + e + f\right )} x^{2} + 3 \, {\left (d + e + f\right )} x + 2 \, d + 2 \, e + 2 \, f\right )} \log \left (x - 1\right ) - {\left ({\left (d + 2 \, e + 4 \, f\right )} x^{2} + 3 \, {\left (d + 2 \, e + 4 \, f\right )} x + 2 \, d + 4 \, e + 8 \, f\right )} \log \left (x - 2\right ) + 60 \, d - 72 \, e + 96 \, f}{144 \, {\left (x^{2} + 3 \, x + 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.32, size = 101, normalized size = 0.96 \begin {gather*} \frac {1}{144} \, {\left (31 \, d + 76 \, f - 50 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) - \frac {1}{36} \, {\left (7 \, d + 19 \, f - 13 \, e\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{36} \, {\left (d + f + e\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{144} \, {\left (d + 4 \, f + 2 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) - \frac {{\left (3 \, d + 6 \, f - 4 \, e\right )} x + 5 \, d + 8 \, f - 6 \, e}{12 \, {\left (x + 2\right )} {\left (x + 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 134, normalized size = 1.28 \begin {gather*} \frac {31 d \ln \left (x +2\right )}{144}+\frac {d \ln \left (x -2\right )}{144}-\frac {d \ln \left (x -1\right )}{36}-\frac {7 d \ln \left (x +1\right )}{36}-\frac {25 e \ln \left (x +2\right )}{72}+\frac {e \ln \left (x -2\right )}{72}-\frac {e \ln \left (x -1\right )}{36}+\frac {13 e \ln \left (x +1\right )}{36}+\frac {19 f \ln \left (x +2\right )}{36}+\frac {f \ln \left (x -2\right )}{36}-\frac {f \ln \left (x -1\right )}{36}-\frac {19 f \ln \left (x +1\right )}{36}-\frac {d}{6 \left (x +1\right )}-\frac {d}{12 \left (x +2\right )}+\frac {e}{6 x +6}+\frac {e}{6 x +12}-\frac {f}{6 \left (x +1\right )}-\frac {f}{3 \left (x +2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 91, normalized size = 0.87 \begin {gather*} \frac {1}{144} \, {\left (31 \, d - 50 \, e + 76 \, f\right )} \log \left (x + 2\right ) - \frac {1}{36} \, {\left (7 \, d - 13 \, e + 19 \, f\right )} \log \left (x + 1\right ) - \frac {1}{36} \, {\left (d + e + f\right )} \log \left (x - 1\right ) + \frac {1}{144} \, {\left (d + 2 \, e + 4 \, f\right )} \log \left (x - 2\right ) - \frac {{\left (3 \, d - 4 \, e + 6 \, f\right )} x + 5 \, d - 6 \, e + 8 \, f}{12 \, {\left (x^{2} + 3 \, x + 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.83, size = 97, normalized size = 0.92 \begin {gather*} \ln \left (x-2\right )\,\left (\frac {d}{144}+\frac {e}{72}+\frac {f}{36}\right )-\ln \left (x+1\right )\,\left (\frac {7\,d}{36}-\frac {13\,e}{36}+\frac {19\,f}{36}\right )-\ln \left (x-1\right )\,\left (\frac {d}{36}+\frac {e}{36}+\frac {f}{36}\right )+\ln \left (x+2\right )\,\left (\frac {31\,d}{144}-\frac {25\,e}{72}+\frac {19\,f}{36}\right )-\frac {\frac {5\,d}{12}-\frac {e}{2}+\frac {2\,f}{3}+x\,\left (\frac {d}{4}-\frac {e}{3}+\frac {f}{2}\right )}{x^2+3\,x+2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________